package beautiful.butterfly.server.httpserver.handlers;

import beautiful.butterfly.server.httpserver.mvc.Constant;
import io.netty.handler.codec.AsciiString;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

//import io.netty.util.AsciiString;


public interface HttpConst {


    String cookie = "cookie";
    String set_cookie = "set-cookie";


    String IF_MODIFIED_SINCE = "IF_MODIFIED_SINCE";
    String USER_AGENT = "User-Agent";
    String CONTENT_TYPE_STRING = "Content-Type";
    String COOKIE_STRING = "XCookie";
    String METHOD_GET = "GET";
    String DEFAULT_SESSION_KEY = "SESSION";
    String SLASH = "/";

    CharSequence CONNECTION = AsciiString.of("Connection");
    CharSequence CONTENT_LENGTH = AsciiString.of("Content-Length");
    CharSequence CONTENT_TYPE = AsciiString.of("Content-Type");
    CharSequence DATE = AsciiString.of("Date");
    CharSequence LOCATION = AsciiString.of("Location");
    CharSequence X_POWER_BY = AsciiString.of("X-Powered-By");
    CharSequence EXPIRES = AsciiString.of("Expires");
    CharSequence CACHE_CONTROL = AsciiString.of("Cache-Control");
    CharSequence LAST_MODIFIED = AsciiString.of("Last-Modified");
    CharSequence SERVER = AsciiString.of("IHttpServer");
    CharSequence KEEP_ALIVE = AsciiString.of("Keep-Alive");

    String CONTENT_TYPE_HTML = "text/html; charset=UTF-8";

    CharSequence VERSION = AsciiString.of("application-" + Constant.VERSION);

    Map<CharSequence, CharSequence> contentTypes = new ConcurrentHashMap<>(8);


}
